package com.xiedafeng.www.view;

import com.xiedafeng.www.po.User;

import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.layout.GridPane;
import javafx.scene.text.Text;
import javafx.stage.Stage;

public class ShowInformationView {
    public void show(User user){
        GridPane gridPane=new GridPane();
        Text account=new Text();
        account.setText("账  号:");
        gridPane.add(account,0,0);
        Text name=new Text();
        name.setText("姓  名:");
        gridPane.add(name,0,1);
        Text sex=new Text();
        sex.setText("性  别:");
        gridPane.add(sex,0,2);
        Text birthday=new Text();
        birthday.setText("生  日:");
        gridPane.add(birthday,0,3);
        Text introduce=new Text();
        introduce.setText("个人说明:");
        gridPane.add(introduce,0,4);
        Text userAccount=new Text(user.getUserName());
        Text userName=new Text(user.getName());
        Text userSex=new Text(user.getSex());
        Text userBirthday=new Text(user.getBirthday());
        Text userIntroduce=new Text(user.getSelfIntroduce());
        gridPane.add(userAccount,1,0);
        gridPane.add(userName,1,1);
        gridPane.add(userSex,1,2);
        gridPane.add(userBirthday,1,3);
        gridPane.add(userIntroduce,1,4);
        gridPane.setAlignment(Pos.CENTER);
        Scene scene=new Scene(gridPane);
        Stage stage=new Stage();
        stage.setScene(scene);
        stage.showAndWait();
    }
}
